package org.firecloud.h5fun.model.javabean;

import java.util.Date;

public class UserBean {
	/**
	 * 用户ID
	 */
	private int id;
	/**
	 * 用户名
	 */
	private String name;
	/**
	 * 用户邮箱
	 */
	private String mail;
	/**
	 * 用户密码MD5值
	 */
	private String passWordMd5;
	/**
	 * 用户积分
	 */
	private int score;
	/**
	 * 用户注册时间
	 */
	private Date regTime;
	/**
	 * 用户最后登陆时间
	 */
	private Date lastLoginTime;
	/**
	 * 是否为管理员
	 */
	private boolean isAdmin;
	
	public boolean isAdmin() {
		return isAdmin;
	}
	public void setAdmin(boolean isAdmin) {
		this.isAdmin = isAdmin;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getMail() {
		return mail;
	}
	public void setMail(String mail) {
		this.mail = mail;
	}
	public int getScore() {
		return score;
	}
	public void setScore(int score) {
		this.score = score;
	}
	
	public String getPassWordMd5() {
		return passWordMd5;
	}
	public void setPassWordMd5(String passWordMd5) {
		this.passWordMd5 = passWordMd5;
	}
	public Date getRegTime() {
		return regTime;
	}
	public void setRegTime(Date regTime) {
		this.regTime = regTime;
	}
	public Date getLastLoginTime() {
		return lastLoginTime;
	}
	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}
	@Override
	public String toString() {
		return "UserBean [id=" + id + ", name=" + name + ", mail=" + mail + ", score=" + score + ", regTime=" + regTime
				+ ", lastLoginTime=" + lastLoginTime + ", admin=" + isAdmin + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserBean other = (UserBean) obj;
		if (id != other.id)
			return false;
		return true;
	}
	
}
